import { request } from '../../utils/request'
import type { certified , editUserDiyInfo , cardInfo ,phone} from '@/model/api/user'

export function getUserInfo() {
    return request({
        url: '/user/getUserInfo',
        method: 'GET',
    })
}

export function userIsCertified() {
    return request({
        url:'/user/isCertified',
        method:'GET'
    })
}

export function userCertified(data:certified) {
    return request({
        url:'/user/certified',
        method:'POST',
        data
    })
}

export function getUserCertifiedInfo(){
    return request({
        url:'/user/certifiedInfo',
        method:'GET'
    })
}

export function editUserInfo(data:editUserDiyInfo){
    return request({
        url:'/user/editInfo',
        method:'POST',
        data
    })
}

export function getUserDiyInfo(){
    return request({
        url:'/user/diyInfo',
        method:'GET'
    })
}

export function identifyCard(data:cardInfo){
    return request({
        url:'/user/identifyCard',
        method:'POST',
        data
    })
}

export function alterPhone(data:phone){
    return request({
        url:'/user/alterPhone',
        method:'POST',
        data
    })
}
